/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sgmi.enthy;

import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ManyToAny;

/**
 *
 * @author HugoCesar
 */
@Entity
@Table (name="secao")
public class Secao implements Serializable{

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column (name = "cod_secao")
private int codSecao;
private String descricao;
@ManyToOne
@JoinColumn (name ="cod_depart", nullable=false)
private Departamentos departamento;

    public int getCodSecao() {
        return codSecao;
    }

    public void setCodSecao(int codSecao) {
        this.codSecao = codSecao;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Departamentos getDepartamento() {
        return departamento;
    }

    public void setDepartamento(Departamentos departamento) {
        this.departamento = departamento;
    }

}
